home *** CD-ROM | disk | FTP | other *** search
/ HAM Radio 1997 / HAM Radio 1997.iso / vcls / wfc007.000 / include / ovrlpd.hpp < prev    next >
Encoding:
C/C++ Source or Header  |  1996-04-08  |  1.1 KB  |  49 lines

  1. #if ! defined( OVERLAPPED_CLASS_HEADER )
  2.  
  3. /*
  4. ** Author: Samuel R. Blackburn
  5. ** CI$: 76300,326
  6. ** Internet: sammy@sed.csc.com
  7. **
  8. ** You can use it any way you like.
  9. */
  10.  
  11. #define OVERLAPPED_CLASS_HEADER
  12.  
  13. class COverlapped
  14. {
  15.    protected:
  16.  
  17.       OVERLAPPED m_Overlapped;
  18.  
  19.    public:
  20.  
  21.       COverlapped();
  22.       COverlapped( const OVERLAPPED * source );
  23.  
  24.       /*
  25.       ** Destructor should be virtual according to MSJ article in Sept 1992
  26.       ** "Do More with Less Code:..."
  27.       */
  28.  
  29.       virtual ~COverlapped();
  30.  
  31.       /*
  32.       ** Methods
  33.       */
  34.  
  35.       inline HANDLE GetEvent( void )                { return( m_Overlapped.hEvent ); }
  36.       inline DWORD  GetOffset( void )               { return( m_Overlapped.Offset ); }
  37.       inline void   IncrementOffset( DWORD amount ) { m_Overlapped.Offset += amount; }
  38.       inline void   SetEvent( HANDLE event_handle );
  39.       inline void   SetOffset( DWORD new_offset )   { m_Overlapped.Offset = new_offset; }
  40.  
  41.       /*
  42.       ** Operators
  43.       */
  44.  
  45.       inline operator OVERLAPPED *() { return( &m_Overlapped ); }
  46. };
  47.  
  48. #endif // OVERLAPPED_CLASS_HEADER
  49.